package member

import (
	"context"
	"github.com/gogf/gf/v2/util/gconv"
	"hotgo/internal/service"

	"hotgo/api/api/member/v1"
)

func (c *ControllerV1) WxMiniLogin(ctx context.Context, req *v1.WxMiniLoginReq) (res *v1.WxMiniLoginRes, err error) {

	loginModel, err := service.AdminSite().AppLogin(ctx, &req.AppLoginInp)
	if err != nil {
		return
	}

	err = gconv.Scan(loginModel, &res)
	return
}
